//-----分类名称------------------------------------------
// -------产品介绍----------------------
const cpcolumns = [{
    title: "标题",
    dataIndex: "title",
    width: "25%",
    scopedSlots: {
        customRender: "title"
    }
},
{
    title: "语言",
    dataIndex: "des",
    width: "15%",
    scopedSlots: {
        customRender: "des"
    }
},
{
    title: "操作",
    dataIndex: "operation",
    scopedSlots: {
        customRender: "operation"
    },

}
];
// -------产品图----------------------
const cpcolumnsimg = [

    {
        title: "产品",
        dataIndex: "picPath",
        width: "10%",
        height: "50px",
        scopedSlots: {
            customRender: "picPath"
        }
    },

    {
        title: "图片类型",
        dataIndex: "typeName",
        width: "8%",
        type: "type",
        scopedSlots: {
            customRender: "typeName"
        }
    },
    {
        title: '排序',
        dataIndex: 'px',
        scopedSlots: {
            customRender: "px"
        }

    },
    {
        title: '中文',
        disable: true,
        dataIndex: 'Name',
        key: '0',
        scopedSlots: {
            customRender: "Name"
        }
    },
    {
        title: '英文',
        dataIndex: 'enName',
        key: '1',
        scopedSlots: {
            customRender: "enName"
        }
    },
    {
        title: '德语',
        dataIndex: 'dwName',
        key: '2',
        scopedSlots: {
            customRender: "dwName"
        }
    },
    {
        title: '日文',
        dataIndex: 'jaName',
        key: '3',
        scopedSlots: {
            customRender: "jaName"
        }
    },
    {
        title: '俄文',
        dataIndex: 'ruName',
        key: '4',
        scopedSlots: {
            customRender: "ruName"
        }
    },
    {
        title: "操作",
        dataIndex: "operation",
        width: '10%',
        scopedSlots: {
            customRender: "operation"
        },

        fixed: 'right',
        width: '200px',
    },

];

//--------------------------------------------------
const data = [


];
const datacp = [{
    key: 1,
    title: "1",
    des: "中文"
}];
const cpimgdata = [{
    key: 1,
    cp: "1",
    DName: "中文",
    tpsm: "123"
}];


const columnsexel = [


];
const dataexel = [];

//----------------产品参数---结束-------------------------
//----------------样本索引---开始-------------------------
const ybsycolumns = [{
    title: '型号',
    dataIndex: 'keywords',
    scopedSlots: {
        customRender: 'keywords'
    },
}, {
    title: '内径',
    dataIndex: 'nj',
}, {
    title: '外径',
    dataIndex: 'wj',
}, {
    title: '宽度',
    dataIndex: 'kd',
}, {
    title: '重量',
    dataIndex: 'zl',
}];

const ybsydata = [];

//----------------样本索引----结束------------------------
//上传图片
function getBase64(img, callback) {

    const reader = new FileReader()
    let file = []
    file = reader
    reader.addEventListener('load', () => callback(reader.result))
    reader.readAsDataURL(img)
    sessionStorage.setItem("file", reader)

}
import qs from "qs"
// fffffffffffffffffffffffffffffffff
import Editor from "../froalaed/froalaed.vue";
//样本索引
export default {
    inject:['reload'],

    data() {
        this.cacheData = data.map(item => ({
            ...item
        }));
        return {
            dataSourceCn: [],
            dataSourceEn: [],
            tableData: [],
            loading: false,
            iconLoading: false,
            //产品介绍---------开始
            datacp, //产品介绍 行数据
            // --还未做  data,//产品介绍 行数据
            cpcolumns, //产品介绍 表头
            cpyy: "中文", //产品介绍 语言种类选择
            titleinput: "", //产品介绍标题
            language: "", //产品介绍--语言
            textarea: "", //产品介绍内容
            subbtn: "", //产品介绍--添加-或-修改按钮显示隐藏

            visible: false, //产品介绍--弹出框显示隐藏
            content:"", //富文本编辑器
                //产品介绍---------结束

            //产品图---------开始
            ssfl: "请选择", //分类名称--所属分类
            cpimgdata, //产品图 行数据
            cpcolumnsimg, //产品图 表头
            file: "", //上传产品图--file
            imageUrl: '', //上传产品图
            loading: false, //上传产品图
            cplx: "0", //产品图类型新增
            cpimgtit: "", //产品图--图片说明
            cptit: {}, //产品图--语言修改
            //产品图---------结束



            //产品参数---------------------开始
            columnsexel,
            dataexel,
            tableParam: [],
            radiobtval: "",
            // slbt: '1',//数据导入--双列表头
            // dlbt: '1',//数据导入--单列表头
            //数据导入---上传文件
            previewVisible: false,
            previewImage: '',

            fileList: [],
            uploading: false,
            exelUrl: "", //exel表格的baes64格式路径
            exflage: false, //exel表格
            sjdrmodal: false,
            xlshz: "", //上传的exel表格的后缀名
            //数据管理--exel表格展示
            //产品参数---------------结束
            //样本索引---------------开始
            pagination: {
                showTotal: total => `共 ${total} 条数据`,
                total: 0
            },
            ybsydata,
            ybsycolumns,
            newindflg: false,
            ybindex: [],
            ybindextitle: [],
            ybindextab: [],
            ybindexChild: [],
            ybindchecked: '',
            wjradio: this.$store.state.wjradio,
            xhradio: [],
            //样本索引---------------结束

            editorOption: {},
            activeName: 'second',
            inputName: {
                Cname: '',
                dwName: ''
            },
            dirid: '',
            xhColNumflag: null,
            xhColNum: [],
            jzflg: false,
            visible: false,
            cpmod_visible: false,
            tab_fileList: [],
            cpt_val: ''
        };
    },
    components: {
 // fffffffffffffffffffffffffffffffff
 Editor
    },
    computed: {
        editor() {
            return this.$refs.myQuillEditor.quill;
        },

    },
    methods: {
          // fffffffffffffffffffffffffffffffff
    init() {
        console.log("!1111111111");
        this.$nextTick(() => {
          console.log(this.content);
          this.$refs.froalaEditor.setHtml(this.content);
        });
      },
      changeContent(html) {
        this.content = html;
      },
      // fffffffffffffffffffffffffffffffff
        callback(key) {
            this.datacp = this.$store.state.datalist
            this.fileList = []
            if (key == 4) {
                this.$store.state.exflage = true
            } else {
                this.$store.state.exflage = false
            }
            // if (key == 4) {
            //     if (this.$store.state.myCars[0].f_10 == undefined) {
            //         console.log('this.ybindextab', this.$store.state.myCars[0])
            //         // console.log($(".yblist "))
            //         $(".yblist .exelbody .ant-table-body").css(
            //             'width', '1000px!important;'
            //         )
            //     } else {
            //         console.log('this.ybindextab', this.$store.state.myCars[0].f_10)

            //         $(".yblist .exelbody .ant-table-body").css(
            //             'min-width', '3000px!important;'
            //         )
            //     }
            // }
            // console.log(key)
        },

        GetSqliteData() {
            this.loading = true;
            this.iconLoading = { delay: 500 };
            this.axios.post("yangben/GetSqliteData.php", qs.stringify({
                filename: this.$store.state.filename
            })).then(res => {
                if (res.data.code == 303) {
                    this.$notification['success']({
                        message: '成功',
                        description: res.data.msg,
                    });

                }
            })
        },
        //分类名称--开始
        mlbc() {

            this.axios.post("yangben/DirectorySet.php", qs.stringify({
                filename: this.$store.state.filename,
                fenleiId: this.$store.state.fenleiId,
                ids: this.$store.state.ids,
                Name: this.$store.state.inputCn,
                enName: this.$store.state.inputEn,
                dwName: this.$store.state.inputRu,
                jaName: this.$store.state.inputJa,
                ruName: this.$store.state.inputDw,
            })).then(res => {
                if (res.data.code == 303) {
                    this.$notification['success']({
                        message: '成功',
                        description: res.data.msg,
                    });
                    this.$parent.getTreeStructure()


                }
            })
        },
        // 分类名称--输入框value
        inputvalu(cnName) {
            this.getdatalist(cnName)
        },

        // 英文
        inputvaluEn(EnName) {
            this.getdatalist(EnName)

        },
        //分类名称--结束

        filterOption(input, option) {
            return option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
        },
        getdatalist(cnName, EnName) {
            this.axios.post("yangben/SampleEntry.php", qs.stringify({
                cnName: cnName,
                EnName: EnName,
                nameType: "1"
            })).then(res => {

                if (res.data.code == 303) {
                    this.dataSourceCn = res.data.result.CnName
                    this.dataSourceEn = res.data.result.EnName
                }
            })
        },

        //产品介绍--语言设置
        Changecpyy(value) {
            if (value == "中文") {
                this.language = "0"
            } else if (value == "英文") {
                this.language = "1"
            } else if (value == "德语") {
                this.language = "2"
            } else if (value == "日文") {
                this.language = "3"
            } else if (value == "俄文") {
                this.language = "4"
            }
        },
        //点击--修改
        editcpxg(value) {
            console.log(value)
            this.visible = true
            this.subbtn = 1
            this.titleinput = value.title
            if (value.language == "0") {
                this.cpyy = "中文"
            } else if (value.language == "1") {
                this.cpyy = "英文"
                console.log(value.language == "1")

            } else if (value.language == "2") {
                this.cpyy = "德语"
            } else if (value.language == "3") {
                this.cpyy = "日文"
            } else if (value.language == "4") {
                this.cpyy = "俄文"
            }
            this.$store.state.xiugaiflag='123'
            this.content = value.content
            this.$store.state.content = value.content
            this.language = value.language
            this.dirid = value.ID_NUM
            console.log(this.$store.state.content)
        },
        //tree--添加分类的输入框
        onchangevalue(value) {
            console.log(this.titleinput)
            this.titleinput = value
        },

        onClose() {
            console.log("onClose11111111111")
            this.visible = false
            this.$store.state.xiugaiflag=''
            this.titleinput = ''
            this.cpyy = '中文'
            this.content = ''
            this.language = '0'
            this.$store.state.content=''
        },
        //提交--修改
        subcpxg() {
            this.axios.post("yangben/ProIntroduceModify.php",
                qs.stringify({
                    filename: this.$store.state.filename,
                    id_num: this.dirid,
                    lgType: this.language,
                    title: this.titleinput,
                    content: this.content
                })).then(res => {
                    console.log(res)
                    if (res.data.code == 303) {
                        this.visible = false
                        console.log(this.titleinput)
                        this.$store.commit('getSampleDetail')
                        if (this.visible == false) {
                            this.titleinput = ''
                            this.cpyy = '中文'
                            this.content = '<h3>你好！</h3>'
                            this.language = '0'
                        }
                        this.$notification['success']({
                            message: '成功',
                            description: res.data.msg,
                        });

                    }
                })
        },
        //新增添加产品介绍
        addcpzj() {
            this.visible = true
            this.subbtn = 2
            this.content = ''
            this.$store.state.content=''
            this.$store.state.xiugaiflag=''


        },
        addcpjs() {
            this.axios.post("yangben/ProIntroduceAdd.php", qs.stringify({
                fenleiID: this.$store.state.fenleiId,
                filename: this.$store.state.filename,
                ids: this.$store.state.ids,
                lgType: this.language,
                title: this.titleinput,
                content: this.content
            })).then(res => {
                console.log(res)
                if (res.data.code == 303) {
                    this.$store.commit('getSampleDetail')
                    this.visible = false
                    if (this.visible == false) {
                        this.titleinput = ''
                        this.cpyy = '中文'
                        this.content = '<h3>你好！</h3>'
                        this.language = '0'
                    }
                    this.$notification['success']({
                        message: '成功',
                        description: res.data.msg,
                    });
                } else {
                    this.$notification['error']({
                        message: '失败',
                        description: res.data.msg,
                    });
                }


            })
        },
        //产品介绍---删除
        onDeleCpjs(value, key) {
            const dataSource = [...this.$store.state.cpjslist]
            const target = dataSource.filter(item => key === item.key)[0]
            this.axios.post("yangben/ProIntroduceDelete.php", qs.stringify({
                filename: this.$store.state.filename,
                id_num: value.ID_NUM,
            })).then(res => {
                console.log(res)
                if (res.data.code == 303) {

                    this.$notification['success']({
                        message: '成功',
                        description: res.data.msg,
                    });
                    this.$store.state.cpjslist = dataSource.filter(item => item.key !== key)

                }

            })
        },
        //------产品介绍结束-------------------------------
        //   ------开始  产品图编辑操作------------------------------------
        //---产品图编辑
        editcp(key) {
            const newData = [...this.cpimgdata];
            const target = newData.filter(item => key === item.key)[0];
            if (target) {
                target.editable = true;
                this.cpimgdata = newData;

            }
        },

        //---产品图--编辑-保存

        cpsave(key) {
            const newData = [...this.cpimgdata];
            const target = newData.filter(item => key === item.key)[0];
            if (target) {
                delete target.editable;
                this.cpimgdata = newData;
                this.cacheData = newData.map(item => ({
                    ...item
                }));
            }
        },
        //---产品图--编辑-取消
        cpcancel(key) {
            const newData = [...this.cpimgdata];
            const target = newData.filter(item => key === item.key)[0];
            if (target) {
                Object.assign(
                    target,
                    this.cacheData.filter(item => key === item.key)[0]
                );
                delete target.editable;
                this.cpimgdata = newData;
            }
        },

        // ----结束  产品图编辑操作----------------------------------------------

        //产品图---类型新增
        lxChange(value) {
            console.log(value);
            this.cplx = value;
        },
        //分类名称编辑value
        handname(value, key, column) {
            const newData = [...this.data];
            const target = newData.filter(item => key === item.key)[0];
            if (target) {
                target[column] = value;
                this.data = newData;
            }
        },
        //产品图编辑value
        handcpname(value, key, column) {
            const newData = [...this.cpimgdata];
            const target = newData.filter(item => key === item.key)[0];
            if (target) {
                target[column] = value;
                this.cpimgdata = newData;
            }
        },
        //-------------------------------------------


        //产品图
        handleChange(value, key, column, val) {
            console.log(val)
            const newData = [...this.$store.state.cpimglist]
            const target = newData.filter(item => key === item.key)[0]

            if (target) {
                target[column] = value
                this.$store.state.cpimglist = newData
            }
            this.cptit = this.$store.state.cpimglist[key]
            console.log('this.cptit.enName', this.cptit)
        },

        //  NumCheck(t){		
        //     var num = t.value;
        //     console.log(t);
        //     var re = /^\d*$/;   //^匹配字符串开始位置   \d 匹配任意一个十进制数字，等价于[0-9]  * 匹配0次 1次或者多次前面的字符  $匹配字符串的结束位置
        //     if(!re.test(num)){
        //         t.value = 0;
        //     }
        // },

        //产品图---语言修改保存
        cptitlebc(key) {
            const dataSource = [...this.$store.state.cpimglist]
            const target = dataSource.filter(item => key === item.key)[0]
            let id_num = target.id_num
            let Name = target.Name
            let enName = target.enName
            let dwName = target.dwName
            let jaName = target.jaName
            let ruName = target.ruName
            let px = target.px
            let picPath = target.picPath
            console.log(picPath)
            this.axios.post("yangben/ProPicModify.php", qs.stringify({
                filename: this.$store.state.filename,
                id_num: id_num,
                Name: Name,
                px: px,
                picPath: picPath,
                enName: enName,
                dwName: dwName,
                jaName: jaName,
                ruName: ruName
            })).then(res => {

                if (res.data.code == 100) {
                    this.$notification['error']({
                        message: '警告',
                        description: res.data.msg,
                    });
                } else {
                    this.$notification['success']({
                        message: '成功',
                        description: res.data.msg,
                    });
                }
            })

        },



        //产品图---删除
        onDelete(key) {
            const dataSource = [...this.$store.state.cpimglist]
            const target = dataSource.filter(item => key === item.key)[0]
            let id_num = target.id_num
            this.axios.post("yangben/ProPicDelete.php", qs.stringify({
                filename: this.$store.state.filename,
                id_num: id_num
            })).then(res => {

                if (res.data.code == 303) {

                    this.$notification['success']({
                        message: '成功',
                        description: res.data.msg,
                    });
                    this.$store.state.cpimglist = dataSource.filter(item => item.key !== key)

                }

            })
        },



        //------开始 上传产品图
        handleCancel() {
            this.previewVisible = false;
        },
        handlePreview(file) {
            this.previewImage = file.url || file.thumbUrl;
            this.previewVisible = true;
        },
        Changecpimg({ fileList }) {
            this.fileList = fileList;
            console.log(this.fileList)
        },
        tabChangecpimg({ fileList }) {
            this.tab_fileList = fileList;
            console.log(this.tab_fileList)
        },
        editshowModal(val) {
            console.log(val)
            this.cpt_val = val
            this.cpmod_visible = true;
        },
        afterClose() {
            console.log("11111111")
            this.tab_fileList = []
            // this.$store.state.xiugaiflag=''


        },
        edithandleOk(e) {
            console.log(e);
            this.cpmod_visible = false;
            this.axios.post("yangben/ProPicAddModifyPic.php", qs.stringify({
                filename: this.$store.state.filename,
                id_num: this.cpt_val.id_num,
                picBase: this.tab_fileList[0].thumbUrl
            })).then(res => {
                console.log(res)
                if (res.data.code == 303) {
                    this.$notification['success']({
                        message: '成功',
                        description: res.data.msg,
                    });
                    this.tab_fileList = []
                    this.$store.commit('getSampleDetail')
                } else {
                    this.$notification['error']({
                        message: '警告',
                        description: res.data.msg,
                    });
                }
            })
        },
        //产品图---新增提交
        addpic() {
            if (this.fileList) {
                this.imageUrl = this.fileList[0].thumbUrl
                console.log(this.imageUrl)
            }
            this.axios.post("yangben/ProPicAdd.php", qs.stringify({
                filename: this.$store.state.filename,
                fenleiID: this.$store.state.fenleiId,
                picBase: this.imageUrl,
                ids: this.$store.state.ids,
                picType: this.cplx,
                picDes: this.cpimgtit
            })).then(res => {

                if (res.data.code == 303) {
                    this.$notification['success']({
                        message: '成功',
                        description: res.data.msg,
                    });
                    this.$store.commit('getSampleDetail')
                } else {
                    this.$notification['error']({
                        message: '警告',
                        description: res.data.msg,
                    });
                }
            })
        },



        //------结束 上传产品图
        // 产品参数---开始
        radiobt(e) {
            this.radiobtval = e.target.value
        },

        //数据导入--文件上传
        scsjexl() {
            if (this.fileList.length) {
                this.exelUrl = this.fileList[0].thumbUrl
                let name = this.fileList[0].name
                var i = name.indexOf(".")
                var data = name.substring(i + 1, name.length);
                this.xlshz = data
                if (this.radiobtval != '' && this.exelUrl != "") {
                    this.jzflg = true
                    this.axios.post("yangben/ProParamUpload.php",
                        qs.stringify({
                            filename: this.$store.state.filename,
                            ids: this.$store.state.ids,
                            tableType: this.radiobtval,
                            fileBase64: this.exelUrl,
                            fileSuffix: this.xlshz
                        })).then(res => {
                            console.log(res)
                            if (res.data.code == 303) {
                                this.jzflg = false

                                this.$notification['success']({
                                    message: '成功',
                                    description: res.data.msg,
                                });
                                this.$store.commit('getSampleDetail')

                            } else {
                                this.$notification['error']({
                                    message: '失败',
                                    description: res.data.msg,
                                });
                            }
                        })
                } else {
                    if (this.radiobtval == "") {
                        this.$notification['error']({
                            message: '失败',
                            description: "请选择表头类型",
                        });
                    } else {
                        this.$notification['error']({
                            message: '失败',
                            description: "上传文件不能为空",

                        });
                    }

                    return;
                }
            } else {
                this.$notification['error']({
                    message: '失败',
                    description: "上传文件不能为空",

                });
            }

        },

        //确认导入
        handleOk(e) {
            this.scsjexl()
            this.sjdrmodal = false

        },

        //数据列表上传
        // exel表格展示
        handleRemove(file) {
            const index = this.fileList.indexOf(file);
            const newFileList = this.fileList.slice();
            newFileList.splice(index, 1);
            this.fileList = newFileList;
        },
        beforeUpload(file) {
            this.fileList = []
            this.fileList = [...this.fileList, file];
            console.log(this.file)
            return false;


        },
        handleUpload(info) {

        },

        // 产品参数---结束

        //富文本编辑器
        onEditorReady(editor) { // 准备编辑器
        },
        onEditorBlur() { }, // 失去焦点事件
        onEditorFocus() { }, // 获得焦点事件
        onEditorChange() { }, // 内容改变事件
        saveHtml: function (event) {
            alert(this.content);
        },
        //富文本编辑器



        //open重提索引面版
        getnewindex() {

            setTimeout(() => {
                // console.log(this.$store.state.xhColNum)
                this.ybindex = this.$store.state.ybindex
                /// console.log(this.ybindex[0].tableData)
                /// for (var i = 0; i < this.ybindex.length; i++) {
                this.ybindextab = this.ybindex[0].tableData
                // }
                this.newindflg = true

            }, 500);


        },
        //是否在型号列 
        isInxhCol(index) {

            for (var i = 0; i < this.$store.state.xhColNum.length; i++) {

                if (this.$store.state.xhColNum[i] == index) {

                    return true;
                }

            }

        },
        //关闭重新提交索引面板
        close() {
            this.newindflg = false
            this.ybindex = []
            this.ybindextitle = []
            this.ybindextab = []
            this.ybindexChild = []
            // this.$store.state.content=''
            // this.$store.state.xiugaiflag=''

            //  this.xhColNum = []
            //  this.$store.state.xhColNum=[]


        },
        //选择型号所在列获取值
        xhChange(e) {

            if (e.target.checked && $.inArray(e.target.value, this.$store.state.xhColNum) == -1) {

                this.$store.state.xhColNum.push(e.target.value)
            } else {
                //this.$store.state.xhColNum.splice(this.$store.state.xhColNum.indexOf(String(e.target.value)), 1)
                for (var i = 0; i < this.$store.state.xhColNum.length; i++) {
                    if (this.$store.state.xhColNum[i] == e.target.value) {
                        this.$store.state.xhColNum.splice(i, 1)
                    }
                }
            }

            console.log('e.target.value', this.$store.state.xhColNum)
        },
        //清除内外径宽度设置
        resetnwj(e) {
            this.$store.state.njradio = ''
            this.$store.state.wjradio = ''
            this.$store.state.kdradio = ''
            this.$store.state.zlradio = ''
        },
        //清除本类索引 
        delallindex() {
            this.axios.post("yangben/SampleDelYbIndex.php", qs.stringify({
                filename: this.$store.state.filename,
                ids: this.$store.state.ids,
            })).then(res => {

                if (res.data.code == 303) {

                    this.$notification['success']({
                        message: '成功',
                        description: res.data.msg,
                    });
                    this.$store.commit('getybsy')
                } else {
                    this.$notification['error']({
                        message: '失败',
                        description: res.data.msg,
                    });
                }
            })
        },


        //重提索引提交
        subtq() {
            //  for (var i = 0; i < this.$store.state.xhColNum.length; i++) {
            //      this.xhColNum.push(String(this.$store.state.xhColNum[i]))
            // }

            this.axios.post("yangben/SampleDetailYbIndexEdit.php", qs.stringify({
                filename: this.$store.state.filename,
                ids: this.$store.state.ids,
                //xhColNum: this.xhColNum[0],
                // xhColNum: this.xhColNum,
                xhColNum: this.$store.state.xhColNum,
                njColNum: this.$store.state.njradio,
                wjColNum: this.$store.state.wjradio,
                kdColNum: this.$store.state.kdradio,
                zlColNum: this.$store.state.zlradio,
            })).then(res => {

                if (res.data.code == 303) {

                    this.$notification['success']({
                        message: '成功',
                        description: res.data.msg,
                    });

                    this.xhColNum = []
                    //  this.$store.state.xhColNum=[]
                    this.$store.commit('getybsy')
                    this.newindflg = false

                } else {
                    this.$notification['error']({
                        message: '失败',
                        description: res.data.msg,
                    });
                    this.xhColNum = []

                }
            })
        },
        //样本索引---结束
        // //清除缓存
        // rushcacho(){
        //     let language=JSON.parse(sessionStorage.getItem("language"))
        // this.axios
        //        .get(
        //          "http://"+language.domainName+"/resetCache/deleteCache?updata=5655840!"
        //        )
        //        .then(res => {
        //          if (res.data.code == 303) {
        //            this.$notification["success"]({
        //              message: "成功",
        //              description: res.data.msg
        //            });
        //          } else {
        //            this.$notification["error"]({
        //              message: "失败",
        //              description: res.data.msg
        //            });
        //          }
        //        });
        //   },

        //EXEL 导出
        exportToExcel() {
            this.axios.post("yangben/ProParamDown.php", qs.stringify({
                filename: this.$store.state.filename,
                ids: this.$store.state.ids,
                name: this.$store.state.datatitle
            })).then(res => {
                console.log(res)
                if (res.data.code == 303) {
                    location.href = res.data.result
                }
            })
        },
       
          
    },

    mounted() {
        //  this.$store.commit('getSampleDetail')
    },
    created() {
        // this.$store.commit('getppval')//品牌
        setTimeout(() => {
            this.$store.commit('getSampleDetail')



        }, 1000);

        this.$store.commit('getybsy')
        this.getdatalist()
        this.datacp = this.$store.state.datalist

    },


};